package util.core.plugins.mycraft.cc;

import java.util.List;

/**
 * 当数据库语句执行时检查字段是否有误
 * 
 * @author delovt
 *
 */
public class DBCheck {
    private String sqlCommand = "";
    private DBConn db         = null;

    public DBCheck(DBConn s) {
        this.setDb(s);
    }

    public boolean CheckCommand(String type) {
        if (this.sqlCommand.length() > 1) {
            switch (type) {
                case "insert":
                    break;
                case "update":
                    break;
                case "delete":
                    break;
                case "select":
                    break;
                case "exec":
                    break;
                default:
                    break;
            }
        }
        return false;
    }

    private List<String> GetDBStrust(String db) {
        return null;
    }
    
    private List<String> GetTableStrust(String tb) {
        return null;
    }
    
    private List<String> Exec(String comm) {
        return null;
    }
    
    public String getSqlCommand() {
        return sqlCommand;
    }

    public void setSqlCommand(String sqlCommand) {
        this.sqlCommand = sqlCommand;
    }

    public DBConn getDb() {
        return db;
    }

    public void setDb(DBConn db) {
        this.db = db;
    }

}
